package com.example.task;

import com.example.model.MemberQuery;
import com.example.service.MemberService;
import lombok.AllArgsConstructor;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
@AllArgsConstructor
public class Task {

    private final MemberService memberService;

    @Scheduled(fixedRate = 5000)
    public void executeTask() {
        memberService.getMemberById(1);
        memberService.getMember(1L);
        memberService.getMembers(1);
        memberService.getMembers(2);
        memberService.getMembers(new MemberQuery(null,"member",null,null));
        memberService.getMemberId("member3");
    }
}
